package com.thinkcube.edutainment.fragment;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EFragment;

import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.thinkcube.edutainment.R;

@EFragment(R.layout.dash_board_main)
public class MyCourseDashBordMainFragment extends Fragment {

	@AfterViews
	void doUi() {
		setNavigationBar();
		addDashBoard();
	}

	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return null;
	}
	
	public static MyCourseDashBordMainFragment newInstance() {
		MyCourseDashBordMainFragment fragment = new MyCourseDashBordMainFragment_();
		return fragment;
	}
	
	MyCourseDashBordMainFragment(){};

	
	
   /*add DashBoard navigation bar fragment*/
	private void setNavigationBar() {

		FragmentTransaction fragmentTransaction = getFragmentManager()
				.beginTransaction();
		MycourseDashBoardMainBar lessonsBar = new MycourseDashBoardMainBar_();

		Bundle bunlde = new Bundle();

		fragmentTransaction.add(R.id.sidebar, lessonsBar);
		fragmentTransaction.commit();
	}

	private void addDashBoard() {
		FragmentTransaction fragmentTransaction = getFragmentManager()
				.beginTransaction();
		MyCoureseDashbordCourse lessonLontent = new MyCoureseDashbordCourse_();

		Bundle bundle = new Bundle();

		lessonLontent.setArguments(bundle);
		fragmentTransaction.replace(R.id.pane, lessonLontent);
		
		fragmentTransaction.commit();
	}

}
